function send() {
    var username = document.getElementById("username").value;
    var password = document.getElementById("password").value;
    var email=document.getElementById("useremail").value;
    // var url=document.getElementById("form").attributes["action"].nodeValue;
    // var type=document.getElementById("form").attributes["method"].nodeValue;
    var data = {
        "appId": username,
        "password": password,
        "email":email
    };
      var json_data = JSON.stringify(data);
    $.ajax({
        type: "post",
        url: "/account/register",
        contentType: "application/json;charset=UTF-8",
        dataType:"json",
        data: json_data,
        success: function (res) {
            if(res.code==2002){
                document.write("恭喜你注册成功，2秒后进入登录页面...");
                setTimeout('login()',2000);
            }
            if(res.code==1111){
                alert(res.msg+",请重新填写");
            }
        }
    })
}
function login() {
    location.assign("/static/home/login.html")
}